<template>
    <div class="sys-page">
        <!--<app-title title="报价管理"></app-title>-->
        <template v-if="showEditQuot">
            <quot-edit></quot-edit>
        </template>
        <template v-else>
            <quot-search></quot-search>
        </template>
    </div>
</template>

<script>
import QuotEdit from './quot_edit';
import QuotSearch from './quot_search';
import { mapState } from 'vuex'

export default {
    name: "quot",
    components: {QuotSearch, QuotEdit},

    mounted() {
        this.loadInitPageData()
    },

    methods: {
        async loadInitPageData(){
            this.$store.commit("quot/Set_Show_Edit_Quot", false);
            let res = await this.$axios.get('/sell/quot/loadInitPageData', {});
            console.log("初始化查询报价页面：", res);
            this.$store.commit("quot/Init_Page_Data", res);
        },
    },

    computed: {
        ...mapState({
            showEditQuot: state => state.quot.showEditQuot
        })
    }
}
</script>

